/* 锁血标记 */
var fixedHPIndex = null

/* 开启锁血 1.0 */
function fixedHP_bc () {
	clearFixedHP ()
	let u = you
	fixedHPIndex = setInterval(()=>{
		u.hp = u.hpmax
	}, 500)
	console.log('开启锁血')
}

/* 关闭锁血 1.0 */
function clearFixedHP_bc () {
	if(!!fixedHPIndex){
		clearInterval(fixedHPIndex)
		fixedHPIndex = null
	}
	console.log('关闭锁血')
}

/* 清除广告 */
function clearAdvertisement_bc () {
	let domList = window.document.getElementsByClassName('main-im')
	if(domList!= null && domList.length > 0){
		for(let i=0;i<domList.length;i++){
			domList[i].style.display = "none"
		}
	}
}

/* --- 开始 --- */
function action_bc () {
	$('body').append(
		"<div id='bc-manage-block'>"+
		"	<button id='open-sx'>打开锁血</button>"+
		"	<button id='close-sx'>关闭锁血</button>"+
		"</div>"
	)
	$('body').append(
		"<style>"+
		"	#bc-manage-block{"+
		"		position: fixed;"+
		"		z-index: 9999;"+
		"		top: 5px;"+
		"		right: 5px;"+
		"		background-color: #fff;"+
		"		width: 100px;"+
		"		height: 200px;"+
		"		padding: 10px;"+
		"		border: 1px solid #ccc;"+
		"		border-radius: 3px;"+
		"	}"+
		"	#bc-manage-block button{"+
		"		padding: 5px 10px;"+
		"		margin: 5px 10px 0 0;"+
		"		outline: none;"+
		"		background-color: #007FF0;"+
		"		color: #fff;"+
		"		text-align: center;"+
		"		font-weight: bold;"+
		"		border-radius: 5px;"+
		"	}"+
		"</style>"
	)
	$('#open-sx').on('click', fixedHP_bc())
	$('#close-sx').on('click', clearFixedHP_bc())
}
$(document).ready(function(){
	action_bc()
})
